var __extends =
    (this && this.__extends) ||
    (function () {
      var t = function (n, e) {
        return (t =
          Object.setPrototypeOf ||
          ({ __proto__: [] } instanceof Array &&
            function (t, n) {
              t.__proto__ = n;
            }) ||
          function (t, n) {
            for (var e in n)
              Object.prototype.hasOwnProperty.call(n, e) && (t[e] = n[e]);
          })(n, e);
      };
      return function (n, e) {
        function i() {
          this.constructor = n;
        }
        if ("function" != typeof e && null !== e)
          throw new TypeError(
            "Class extends value " + String(e) + " is not a constructor or null"
          );
        t(n, e),
          (n.prototype =
            null === e
              ? Object.create(e)
              : ((i.prototype = e.prototype), new i()));
      };
    })(),
  DaBiPingRankListView = (function (t) {
    function n() {
      var n = t.call(this) || this;
      return (
        WebSocketService.addListener({
          caller: n,
          code: 20301,
          method: n.onLoadDaBiPingRankListData,
        }),
        n.btn_dbprank_back.on(Laya.Event.CLICK, n, n.onCancleBtnClickFn),
        (n.list_dbp_rankData.vScrollBarSkin = ""),
        n
      );
    }
    return (
      __extends(n, t),
      (n.openDaBiPingRankView = function () {
        return (
          null == this.dabipingRankV && (this.dabipingRankV = new n()),
          WebSocketService.send({ c: 20301 }),
          this.dabipingRankV
        );
      }),
      (n.prototype.onLoadDaBiPingRankListData = function (t) {
        var n = t.data;
        if (n && n.length > 0) {
          (this.tempArray = t.data), (this.list_dbp_rankData.visible = !0);
          var e = void 0;
          this.mainArray = [];
          for (var i = 0; i < n.length; i++) {
            var a = n[i];
            (e = {
              label_item_index: { text: i + 1 + "、" },
              label_item_score: { text: a.roleName },
              label_item_name: { text: a.score + "积分" },
            }),
              this.mainArray.push(e);
          }
          this.list_dbp_rankData.dataSource = this.mainArray;
        }
      }),
      (n.prototype.onCancleBtnClickFn = function () {
        this.removeSelf();
      }),
      n
    );
  })(ui.ActivityController.DaBiPingRankListViewUI);
